package com.bnivideo.ui.reflection

import java.net.*;
import java.io.*;

/**
 * Created by IntelliJ IDEA.
 * User: jiming
 * Date: 11-2-9
 * Time: 下午4:18
 * To change this template use File | Settings | File Templates.
 */


try {
    URL[] urls = [ new URL("http://www.javacourses.com/classes/test.jar") ];
    URLClassLoader loader = new URLClassLoader(urls);

    Class<?> loadClass = loader.loadClass("Tester");
    System.out.println(loadClass.newInstance().toString());
} catch (MalformedURLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} catch (ClassNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} catch (InstantiationException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} catch (IllegalAccessException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
